package com.zzty.txj1.service.impl;

import com.zzty.txj1.dao.LocationDao;
import com.zzty.txj1.entity.Location;
import com.zzty.txj1.service.LocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LocationServiceImpl implements LocationService {
    @Autowired
    private LocationDao locationDao;
    @Override
    public Location getLocationById(Location location) {
        Location location1=locationDao.getLocationById(location);
        return location1;
    }

    @Override
    public Integer addLocation(Location location) {
        Integer count=locationDao.addLocation(location);
        return count;
    }

    @Override
    public List<Location> getAllLocation() {
        List<Location> locations=locationDao.getAllLocation();
        return locations;
    }

    @Override
    public Integer deleteLocationById(Location location) {
        Integer count=locationDao.deleteLocationById(location);
        return count;
    }

    @Override
    public Integer updateLocationById(Location location) {
        Integer count=locationDao.updateLocationById(location);
        return count;
    }
}
